package com.java.basis.thread;

/**
 * @author wangning
 * @create 2021-04-25 9:11
 */
public class TestRunnableThread{
	public static void main(String[] args) {
		MyRunnable myRunnable = new MyRunnable();
		Thread t1 = new Thread(myRunnable);
		t1.start();
		for (int i = 0; i < 10; i++) {
			System.out.println("main: " + i);
		}
	}
}

class MyRunnable implements Runnable {

	@Override
	public void run() {
		for (int i = 0; i < 10; i++) {
			System.out.println("MyRunnable: " + i);
		}
	}
}
